package com.ss.android.account;

import android.os.Message;
import com.bytedance.common.utility.collection.WeakHandler;
import com.ss.android.common.AbsApiThread;
import com.ss.android.common.util.NetworkUtils;
import org.json.JSONObject;

final class i extends AbsApiThread {
    private final Spipe a;

    i(Spipe arg1, String arg2, Priority arg3) {
        super(arg2, arg3);
        this.a = arg1;
    }

    public final void run() {
        Spipe v2 = this.a;
        int v1 = 18;
        String v0 = "";
        try {
            String v3 = NetworkUtils.doGet(1024, new StringBuilder(Spipe.userLogoutUrl).toString());
            if(android.support.design.a.isTextEmpty(v3)) {
            }else {

                JSONObject v4 = new JSONObject(v3);
                if ("success".equals(v4.getString("message"))) {
                    v2.P.sendEmptyMessage(1017);
                    return;
                }

                JSONObject v3_1 = v4.optJSONObject("data");
                if (v3_1 == null) {
                }else {
                    v1 = v3_1.optInt("error_code");
                    v0 = v3_1.optString("description");
                }
            }
        } catch(Throwable v1_1) {
            v1 = bb.a().a(v2.O, v1_1);
        }

        Message v3_2 = v2.P.obtainMessage(1018);
        v3_2.arg1 = v1;
        v3_2.obj = v0;
        WeakHandler v0_1 = v2.P;
        v0_1.sendMessage(v3_2);
    }
}

